<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
    <tr>
        <th>名字</th><th>工资</th><th>工作</th>
    </tr>
    <!--v-for遍历数组 ,数组中有多个对象 就会遍历生成多少个tr组合   -->
    <tr v-for="e in arr">
        <td v-text="e.name">张三</td>
        <td v-text="e.sal">3000</td>
        <td v-text="e.job">销售</td>
    </tr>
</table>
<!--引入vue-->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
    let vm = new Vue({
        el:"table",
        data:{
            arr:[{name:"刘备",sal:6000,job:"程序员"},
                {name:"关羽",sal:3000,job:"人事"},
                {name:"张飞",sal:2000,job:"财务"}]
        }
    })
</script>
</body>
</html>